<style>
    .xh-form .btn{
        margin-right: 0px;
    }
    .xh-form tr td:nth-child(2n){
        padding: 5px 20px 5px 0;
    }
    td >label{
        float: right;
        margin-right: 10px;
    }
    body{
        background-color: #f9f9f9;
    }
    #prodList  th {
        text-align: center;
        vertical-align: middle !important;
    }
</style>

<script>
    var formData = {% if formData is defined %} {{ formData | json_encode }} {% else %} null {% endif %};
</script>

{% if powerScript is defined %}
    {{ powerScript }}
{% endif %}
<form id="xh_form" class="xh-form"  method="post"    style="margin-left: 20px;">
    <div class="xh-area-form">
        <table style="width: 100%;height: 100%;">
            <tr>
                <td style="width: 75px;"><label >商品名称</label></td>
                <td>
                    <input name="sProdName" type="text" readonly>
                    <input type="hidden" name="iProdId">
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <table id="prodList" class="table">
                        <tr class="info" >
                            <th style="width: 50%;">配件名称</th>
                            <th style="width: 25%">组成数量</th>
                        </tr>
                        <tr  class="modelTr" >
                            <td>
                                <input class="prodName" type="text" placeholder="配件名称">
                            </td>
                            <td><input class="num" type="number" min="0" placeholder="数目小于等于0，则删除" step="1"></td>
                        </tr>
                        <tr>
                            <td colspan="2"><a id="addBtn" class="btn btn-default" style="float: right;">新增</a></td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
</form>

